<?php
error_reporting(0);
session_start();
$user_type = $_SESSION["sess_user_type"];
if (isset($_REQUEST['tab'])) { 
    $tab = $_REQUEST['tab']; //มีการเรียกtab เข้าไปตาม tab นั้น
} else { 
    $tab = "0"; // if not  logon yet
} 
include "common/commonFns.php";
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ระบบจัดการสารสนเทศเพื่อสนับสนุนการช่วยเหลือเยียวยาผู้ได้รับผลกระทบฯ</title>
<link href="css/styletabz.css" type="text/css" rel="stylesheet"/>
<link href="css/examples.css" type="text/css" rel="stylesheet"/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<?php
if($tab=="gis"){
?>
<script src="http://maps.google.com/maps?file=api&v=2&hl=th&key=ABQIAAAAuV1l0e8ao6lQpLAtqzSahRR7WcvzUPLpIn2rbYwveX5XXa9KYRScoFrh6VsXrPem-NuXyXDIyDCHqg" type="text/javascript"></script>

    <script type="text/javascript" src="lib/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="lib/mxn/mxn.js?(google)"></script>
    <script type="text/javascript" src="lib/timeline-1.2.js"></script>
    <script src="src/timemap.js" type="text/javascript"></script>
    <script src="src/param.js" type="text/javascript"></script>
    <script src="src/loaders/xml.js" type="text/javascript"></script>
    <script src="src/loaders/kml.js" type="text/javascript"></script>

<script src="common/jsfunction.js" type="text/javascript"></script>
<style>
  div#timelinecontainer{ height: 100; }
  div#mapcontainer{ height: 700; }
</style>
<?php
}
?>
</head>
<div id="wrapper">
	<div id="logo">
		<h3 align="center">A Management Information System for Supporting Relief Activities of Victims Affected by the Violence in the Southern Border Provinces</h3>
		<h1 align="center">ระบบสารสนเทศเพื่อการจัดการสนับสนุนการช่วยเหลือเยียวยาผู้ได้รับผลกระทบ<br />
		จากเหตุการณ์ความไม่สงบในจังหวัดชายแดนภาคใต้</h1>
		<h2 align="center">ศูนย์ประสานงานวิชาการให้ความช่วยเหลือผู้ได้รับผลกระทบจากเหตุความไม่สงบจังหวัดชายแดนใต้</h2>
	</div>
	<hr />
	<!-- end #logo -->
	<div id="header">
		<div id="menu">
		<ul><?php
			echo getMenu($tab,$user_type);
?></ul>
		</div>
		<!-- end #menu -->
	</div>
	<!-- end #header -->
	</div>
	<!-- end #header-wrapper -->
<body>
<table width="960" height="100%" border="0" align="center">
  <tr valign="top">
    <td height="417"><table width="960" border="0">
      <tr valign="top">
		<td align="left"></td>
 </tr><tr><td width="1024">
<?php
//เรียก page เปลี่ยนตาม tab
switch ($tab) { 
    case "logout":     //Manage User Tab1 
		//unset( $_SESSION['sess_user_type']);
		//unset( $_SESSION['sess_user_type']);
		session_destroy();
?>
		<script type="text/javascript">
			window.location.href='index.php';
		</script>
<?php
	    break; 
    case "gis":
		include "first_timemap.php";
	    break; 
    case "mtrgetdata":
		include "manage_monitordata/monitor_receive_data.php";
	    break; 
    case "esearch":  
		include "search_event.php";
	    break; 
    case "vsearch":  
		include "search_victim.php";
	    break;
    case "event":
		include "event.php";
	    break; 
	case "victim":
		include "victim.php";
	    break; 
	case "relief":
		include "relief.php";
	    break; 
    case "manageuser":
		include "manage_user.php";
	    break; 
    case "chngpwd":
		include "chngpwd.php";
	    break; 
    case "about":
		include "about.php";
	    break; 
    case "apply":
		include "apply.php";
	    break; 
    case "report":
		include "report.php";
	    break; 
    default:    
		include "login.php";
	 break; 
}
?>
    </td></tr></table></td>
  </tr>
  <tr>
  	<td><!-- Histats.com START (standard)--> <script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15_gif.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script> <a href="http://www.histats.com" target="_blank" title="free website stats program" ><script type="text/javascript" > try {Histats.startgif(1,1489391,4,8003,""); Histats.track_hits();} catch(err){}; </script></a> <noscript><a href="http://www.histats.com" alt="free website stats program" target="_blank" ><div id="histatsC"><img border="0" src="http://s4is.histats.com/8003.gif?1489391&103"></div></a> </noscript> <!-- Histats.com END --> &copy; DSCC Pattani, Developed by DSCC Pattani <br />Building 51B, 3rd Floor, Room 310, Faculty of Science and Technology. Prince of Songkla University. Pattani Campus. Muang, Pattani, Thailand. 94000.</td>
  </tr>
</table>
</body>
</html>
